from AudioFx import AudioSlot
from pyo import *

class Lfo(AudioSlot):
    """
    example audio process
    """
    name = "Lfo"
    ctrls = ["freq1","freq2","morph"]
    def __init__(self):
        AudioSlot.__init__(self, "mod",self.name,self.ctrls)
        self.modOut = Sine(self.ctrl1*5+0.01, mul = self.ctrl3*0.5,add = .5)+Sine(self.ctrl2*5+0.1, mul = (1-self.ctrl3)*.5,add=.5)
        self.initVals = [0,0,0.5]


# PUT MODULES IN HERE!
# Max 19 modules per category
name = "basicsMod"
slotType = "mod"
modulesDict = {
                0:{"class": Lfo}
                }

# for i in range(16):
#   modulesDict["fx"][i+3] = {"class":Filter} 
for i, slot in modulesDict.items():
    slot["name"] = slot["class"].name
    slot["ctrls"] = slot["class"].ctrls

# for slotypename, classesDict in modulesDict.items():#autogenerate dict acording to slot info 
#     for i, slot in classesDict.items():
#         slot["name"] = slot["class"].name
#         slot["ctrls"] = slot["class"].ctrls